home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97b.txt
/
000070_icon-group-sender _Thu Sep 18 08:14:52 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by cheltenham.cs.arizona.edu (8.8.7/8.8.7) with SMTP id IAA25545
for <icon-group-addresses@cheltenham.CS.Arizona.EDU>; Thu, 18 Sep 1997 08:14:51 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA05089; Thu, 18 Sep 1997 08:14:50 -0700
Date: Tue, 16 Sep 1997 23:11:15 GMT
From: ia@stryx.demon.co.uk (Iain Alexander)
Reply-To: ia@stryx.demon.co.uk
Message-Id: <25954@stryx.demon.co.uk>
To: icon-group@cs.arizona.edu
Subject: Re: Problem with Program
X-Mailer: PCElm 1.10
Lines: 45
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
In message <Stuart.Robinson-1609972256580001@asianstmg-221.anu.edu.au> Stuart.Robinson@anu.edu.au (Stuart Robinson) writes:
>
> I just wrote up a little program to check each line of text for the number
> of times the string "#PL" appears. I want the program to put the line in
> list_1 if the string shows up once, in list_2 if the string shows up
> twice, in list_3 if the string show up three times, and in list_other if
> it fails to show up at all or shows up more than three times. The problem
> is, it doesn't work. What gives? Thanks in advance.
>
> ==========
>
> #16 Sept 1997
> #program written to print all clauses in which plurality is multiply marked
>
> procedure main()
>
> list_1 := []
> list_2 := []
> list_3 := []
> otherlist_other := []
>
> chars := &letters++-#7
> count := 0
>
> while line := read() do
> {
try
count:= 0
> line ?
> {
> while tab(upto(chars)) do
> {
> word := tab(many(chars))
> word ?
> {
> if find("#PL") then count +:= 1
> {
> }
> }
[etc. snipped]
--
Iain Alexander PGP 1024-bit key id B501A0AD
ia@stryx.demon.co.uk I.Alexander@bsn0106.wins.icl.co.uk